<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // 字符转U编码、
        // str.charCodeAt()
    var str="张新同小帅逼"
    // res=str.charCodeAt(0)
    for(i=0;i<str.length;i++){
        res=str.charCodeAt(i)
        console.log(res)
    }
    console.log(String.fromCharCode(24352,26032,21516,23567,24069,36924))



    // a~z = 97~122 
    console.log("a".charCodeAt());          //a=97
    console.log("z".charCodeAt());          //z=122

    // A~Z = 65~90
    console.log("A".charCodeAt());          //A=65
    console.log("Z".charCodeAt());          //Z=90

    // 48~57
    console.log("0".charCodeAt(0));
    console.log("9".charCodeAt(0));

</script>
</html>